package ophiux.api.sdk.test;

import ophiux.common.utils.HttpUtil;

public class test_HttpUtil {

	public static void test_httpPostConnection_Success(){
		//http://192.168.1.10:8924/ophiuxDataService2/ws/service?wsdl
		//http://222.179.198.206:8918/ophiuxDataService/ws/service?wsdl
		String requestUrl = "http://192.168.1.10:8924/ophiuxDataService2/ws/service?wsdl";
        String soap = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" " +
        		"xmlns:own=\"http://own.mamp.ophiux.com/\"> " +
                      "<soapenv:Body>" +
                      " <own:medicalRecordInfo>" +
                      "<arg0>" +
                      "<![CDATA[<OPHIUX><HEAD><USER_NAME>jiuyi160</USER_NAME><USER_PWD>123456</USER_PWD>" +
                      "<TOKEN>BFCDD9CCE33FE615EDEA4A401F1AB3E6</TOKEN><R_FORM>JSON</R_FORM></HEAD><PARAM>" +
                      "<HOSPITAL_CODE>001</HOSPITAL_CODE><ID_CARD_NUMBER>500230199509083733</ID_CARD_NUMBER>" +
                      "<TEL>13896737541</TEL><NAME>�κ���</NAME><INHOSPITAL_CODE>1008611</INHOSPITAL_CODE>" +
                      "<S_DATE></S_DATE><E_DATE></E_DATE></PARAM></OPHIUX>]]>" +
                      "</arg0>" +
                      "<arg1>XML</arg1>" +
                      "</own:medicalRecordInfo> " +
                      "</soapenv:Body> </soapenv:Envelope>";
        		
        
		try {
			String res = HttpUtil.httpsRequest(requestUrl, "POST", soap);
			System.out.println(res);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	public static void main(String[] args) {
		test_httpPostConnection_Success();
	}
	
}
